package cn.iocoder.yudao.module.mqtt.controller.admin.commport.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 通讯口配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CommPortRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17081")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "通讯口名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("通讯口名称")
    private String portName;

    @Schema(description = "波特率")
    @ExcelProperty("波特率")
    private String baudRate;

    @Schema(description = "数据位")
    @ExcelProperty("数据位")
    private String dataBits;

    @Schema(description = "校验位", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "校验位", converter = DictConvert.class)
    @DictFormat("mqtt_port_check") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String parity;

    @Schema(description = "停止位")
    @ExcelProperty("停止位")
    private String flowControl;

    @Schema(description = "流控制（可选）")
    @ExcelProperty("流控制（可选）")
    private String subTopics;

    @Schema(description = "描述", example = "你说的对")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}